package com.waves.design.proxy;

/**
 * 业务类
 */
public class AccessValidator {

    public boolean validate(String userId) {
        System.out.println("验证用户" + userId + "是否为合法用户");
        if ("杨过".equals(userId)) {
            System.out.println("登录成功");
            return true;
        } else {
            System.out.println("登录失败");
            return false;
        }
    }
}
